<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::prefix('backend')->group(function () {
    Route::group(['middleware' => 'auth.admin'], function () {

        Route::get('/', 'BackendController@index');
        Route::get('/show', 'BackendController@show');
        Route::post('/zip', 'ZipController@pclzip');


        //软件分类列表
        Route::get('/appcat', 'AppcatController@index');
        //软件分类添加
        Route::get('/appcatcreate/{id}', 'AppcatController@create');
        //软件分类编辑
        Route::post('/appcatedit', 'AppcatController@store');
        //软件分类删除
        Route::get('/appcatdel/{id}', 'AppcatController@destroy');

        //软件列表
        Route::get('/app', 'AppController@index');
        //软件添加
        Route::get('/appcreate/{id}', 'AppController@create');
        //软件编辑
        Route::post('/appedit', 'AppController@store');
        //软件删除
        Route::get('/appdel/{id}', 'AppController@destroy');

        //Banner列表
        Route::get('/banner/{type}', 'BannerController@index');
        //Banner添加
        Route::get('/bannercreate/{type}/{id}', 'BannerController@create');
        //Banner修改
        Route::post('/banneredit', 'BannerController@store');
        //Banner删除
        Route::get('/bannerdel/{type}/{id}', 'BannerController@destroy');

        //模型列表
        Route::get('/model/{type}', 'DataController@index');
        //模型添加
        Route::get('/modelcreate/{id}/{type}', 'DataController@create');
        //模型修改
        Route::post('/modeledit', 'DataController@store');
        //模型删除
        Route::get('/modeldel/{type}/{id}', 'DataController@destroy');
        //模型删除
        Route::get('/modeldown/{id}', 'DataController@down');
        // 模型审核
        Route::get('/modelallow', 'DataController@allow');
        // 模型原图
        Route::get('/modelimages/{id}', 'DataController@showimgs');
        // 单张缩略图制作
        Route::post('/makeonethumb', 'DataController@makeonethumb');


        //贴图列表
        Route::get('/map/{type}/{cat_id1}', 'MapController@index');
        //贴图添加
        Route::get('/mapcreate/{id}', 'MapController@create');
        //贴图修改
        Route::post('/mapedit', 'MapController@store');
        //贴图删除
        Route::get('/mapdel/{id}', 'MapController@destroy');


        //案例列表
        Route::get('/article/{type}', 'ArticleController@index');
        //案例添加
        Route::get('/articlecreate/{id}/{type}', 'ArticleController@create');
        //案例修改
        Route::post('/articleedit', 'ArticleController@store');
        //案例删除
        Route::get('/articledel/{id}', 'ArticleController@destroy');
        //展示案例采集
        Route::get('/articlequery', 'ArticleController@articlequery');
        //案例采集
        Route::post('/query', 'ArticleController@query');

        //提现列表
        Route::get('/tixian', 'TixianController@index');
        //提现审核
        Route::get('/tixiancreate/{id}', 'TixianController@create');
        //提现修改
        Route::post('/tixianedit', 'TixianController@store');
        //提现删除
        Route::get('/tixiandel/{id}', 'TixianController@destroy');

        //充值订单列表
        Route::get('/order', 'OrderController@index');
        //充值订单审核
        Route::get('/ordercreate/{id}', 'OrderController@create');
        //充值订单修改
        Route::post('/orderedit', 'OrderController@store');
        //充值订单删除
        Route::get('/orderdel/{id}', 'OrderController@destroy');

        //用户列表
        Route::get('/users', 'UserController@index');
        //用户列表
        Route::get('/userinfo/{id}', 'UserController@show');
        //用户添加
        Route::get('/userscreate/{type}/{id}', 'UserController@create');
        //用户修改
        Route::post('/usersedit', 'UserController@store');
        //用户禁用
        Route::get('/usersdel/{id}', 'UserController@destroy');
        //用户启用
        Route::get('/usersuse/{id}', 'UserController@usersuse');
        //邀请用户
        Route::get('/userinvited', 'InvitedController@index');

        Route::get('/catlist/{id}', 'CatController@index');
        Route::get('/catcreate/{id}/{type}', 'CatController@create');
        Route::post('/catedit', 'CatController@store');

        //测试路由
        Route::get('/ceshi', function () {
            return view('backend::test');
        });
        //统计用户模型数量
        Route::get('countuserdatas','UserController@countuserdatas');

        //注册统计
        Route::get('registercount','CountController@register');
        //提现统计
        Route::get('tixiancount','CountController@tixian');
        //充值统计
        Route::get('paycount','CountController@pay');
        //下载统计
        Route::get('downcount/{type}','CountController@down');

        //下载列表
        Route::get('downlist/{type}','DownController@downlist');
        //VIP下载列表
        Route::get('downviplist/{type}','DownController@downviplist');

        //后台充值列表
        Route::get('/border', 'BorderController@index');
        //后台充值页面
        Route::get('/bordercreate/{paytype}', 'BorderController@create');
        //后台充值
        Route::post('/borderedit', 'BorderController@store');

        //管理员列表
        Route::get('/admin', 'AdminController@index');
        //管理员添加修改页面
        Route::get('/admincreate/{id}', 'AdminController@create');
        //管理员修改
        Route::post('/adminedit', 'AdminController@store');

        //跳转提示路由
        Route::resource('/prompt','PromptController');
        //跳转提示路由
        Route::get('/redirectnote','PromptController@redirectnote');
    });


    Route::get('login', 'LoginController@showLoginForm')->name('admin.login');
    Route::post('login', 'LoginController@login');
    Route::get('logout', 'LoginController@logout');


});


